﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using STT.Layer.Connection;
using System.Data;
namespace STT.Home
{
    public partial class UcIndex : System.Web.UI.UserControl
    {
        ToolBox tb = new ToolBox();
        protected void Page_Load(object sender, EventArgs e)
        { if(!IsPostBack)
            LoadTT();
        }
        private void LoadTT()
        {
            DataTable dt = tb.GetDataTable("TbTinTuc_SelectAll");
            cpl.PageSize = 3;
            cpl.DataSource = dt.DefaultView;
            cpl.BindToControl = dlltintuc;
            dlltintuc.DataSource = cpl.DataSourcePaged;
            dlltintuc.DataBind();
        }

    }
}